home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmiSoft / Util / Misc / Reportplus.lha / reportplus / source / f5.c < prev    next >
C/C++ Source or Header  |  2003-02-14  |  74KB  |  1,716 lines

  1. #include <exec/types.h>
  2. #include <clib/exec_protos.h>
  3. #include <intuition/intuition.h>
  4. #include <intuition/gadgetclass.h>
  5. #include <clib/intuition_protos.h>
  6. #include <libraries/gadtools.h>
  7. #include <clib/gadtools_protos.h>
  8. #include <libraries/expansion.h>
  9. #include <libraries/expansionbase.h>
  10. #include <libraries/configvars.h>
  11. #include <clib/expansion_protos.h>
  12. #include <graphics/gfx.h>
  13. #include <clib/graphics_protos.h>
  14. #include <dos/dostags.h>
  15.  
  16. #include <ctype.h>
  17. #include <stdlib.h>
  18. #include "rp.h"
  19. #include "boards.h"
  20.  
  21. #include <reaction/reaction.h>
  22. #include <gadgets/chooser.h>
  23. #include <pragmas/chooser_pragmas.h>
  24. #include <gadgets/string.h>
  25. #include <pragmas/string_pragmas.h>
  26. #include <gadgets/integer.h>
  27. #include <pragmas/integer_pragmas.h>
  28. #include <gadgets/checkbox.h>
  29. #include <pragmas/checkbox_pragmas.h>
  30. #include <gadgets/layout.h>
  31. #include <pragmas/layout_pragmas.h>
  32. #include <gadgets/button.h>
  33. #include <pragmas/button_pragmas.h>
  34. #include <images/label.h>
  35. #include <pragmas/label_pragmas.h>
  36. #include <proto/label.h>
  37. #include <classes/window.h>
  38. #include <pragmas/window_pragmas.h>
  39.  
  40. #define MANUFS 272
  41.  
  42. MODULE  ULONG                 querymanuf,
  43.                               queryproduct,
  44.                               boards,
  45.                               whichboard,
  46.                               precedence;
  47. MODULE  UWORD                 selectedmanuf   = 0,
  48.                               selectedproduct = 0;
  49. MODULE  struct ExpansionBase* ExpansionBase   = NULL;
  50. MODULE  TEXT                  cardnumber[10];
  51. MODULE  TEXT                  manuf_buffer[49],
  52.                               product_buffer[49];
  53. MODULE  ABOOL                 foundmanuf,
  54.                               foundproduct;
  55. MODULE  struct List           ManufChooserList;
  56. MODULE  struct ChooserNode*   ManufChooserNodePtr[1 + 1];
  57.  
  58. MODULE void checklibrary(ULONG whichmanuf, ULONG whichproduct);
  59. MODULE void checkinternal(ULONG whichmanuf, ULONG whichproduct);
  60. MODULE void nomanuf(void);
  61. MODULE void noproduct(void);
  62. MODULE void runquery(ULONG whichmanuf, ULONG whichproduct);
  63. MODULE void updatemanuf(void);
  64. MODULE void autoquery(void);
  65.  
  66. // from rp.c
  67. IMPORT WORD              xsize;
  68. IMPORT ULONG             signal;
  69. IMPORT SBYTE             page;
  70. IMPORT ABOOL             fillwindows;
  71. IMPORT TEXT              IOBuffer[LONGESTFIELD + 1],
  72.                          cpuline[VLONGFIELD + 1];
  73. IMPORT struct Window*    MainWindowPtr;
  74. IMPORT struct Library*   BoardsBase;
  75. IMPORT struct Screen*    ScreenPtr;
  76. IMPORT struct Library   *ButtonBase,
  77.                         *CheckBoxBase,
  78.                         *ChooserBase,
  79.                         *IntegerBase,
  80.                         *LabelBase,
  81.                         *LayoutBase,
  82.                         *StringBase,
  83.                         *WindowBase;
  84. IMPORT struct Menu*      MenuPtr;
  85. IMPORT Object*           WinObject[FUNCTIONS + 1];
  86.  
  87. MODULE struct
  88. {   UWORD             manuf;
  89.     UBYTE             product;
  90.     struct ConfigDev* ConfigDevPtr;
  91.     APTR              BoardAddr, Driver;
  92.     ULONG             BoardSize, SerialNumber;
  93.     UWORD             SlotAddr, SlotSize;
  94. } board[16]; // how many boards are simultaneously attachable?
  95.  
  96. AGLOBAL struct Gadget*   manuf_gadgets[GIDS_5 + 1];
  97.  
  98. STRPTR ManufOptions[1 + 1] =
  99. {   "Library, then internal",
  100.     "Internal, then library"
  101. };
  102.  
  103. MODULE struct
  104. {   ULONG  number[3];
  105.     UBYTE  howmany; // how many of the three numbers are registered.
  106.     // They go from left to right.
  107.     STRPTR name;
  108. } manuf[MANUFS + 1] =
  109. {
  110.  1012,    -1,    -1, 1, "Access Associates",
  111.  2003,    -1,    -1, 1, "ACDA",
  112.  2149,    -1,    -1, 1, "ACS",
  113.  2070,    -1,    -1, 1, "Active Circuits Inc.",
  114.  1017,    -1,    -1, 1, "ADA Research",
  115.  2056,  2061,    -1, 2, "Adept Development",
  116.  2057,    -1,    -1, 1, "Advanced Computer Design",
  117.  1046,    -1,    -1, 1, "Advanced Micro Innovations",
  118.  2102,    -1,    -1, 0, "Advanced Storage Systems",
  119.  2016,    -1,    -1, 1, "Akron Systems",
  120.  2083,    -1,    -1, 1, "Alberta Micro Electronic Center",
  121.  2130,    -1,    -1, 1, "Alfa-Laval",
  122.  2063,    -1,    -1, 1, "Alphatech",
  123.  2190,    -1,    -1, 1, "Altatech",
  124.  5010,    -1,    -1, 1, "Ambience Creation Technology",
  125.  2068,    -1,    -1, 1, "Amdev",
  126.  2025,  2094,    -1, 2, "American Liquid Light",
  127.  1053,    -1,    -1, 1, "Ameristar",
  128.  2118,    -1,    -1, 1, "The Amiga Centre",
  129.  2055,    -1,    -1, 1, "Amiga Solutions",
  130.  1019,  2041,    -1, 2, "Amigo Business Computers",
  131.  2176,    -1,    -1, 1, "AmiTrix Development",
  132.  2183,    -1,    -1, 1, "AMOK - Amiga Module & Oberon Klub",
  133.  2116,    -1,    -1, 1, "AMS",
  134.  1009,    -1,    -1, 1, "Anakin Research",
  135.  2007,  2121,    -1, 2, "Analog Electronics",
  136.  1061,    -1,    -1, 1, "Analog Precision or D&L Distributing",
  137.  2088,    -1,    -1, 1, "Applied Engineering",
  138.  2207,    -1,    -1, 1, "Applied Magic Inc.",
  139.  2028,  2054,    -1, 2, "Applied Systems & Peripherals/Xebec",
  140.  2132,    -1,    -1, 1, "Archos",
  141.  1023,    -1,    -1, 1, "ASDG Inc.",
  142.  1005,    -1,    -1, 1, "A-Squared",
  143.  2146,    -1,    -1, 1, "Atlantis",
  144.  2036,    -1,    -1, 1, "Atronic",
  145.  2143,    -1,    -1, 1, "Axellabs",
  146.  2160,    -1,    -1, 1, "bbdp Electronics",
  147.  2008,    -1,    -1, 1, "Bell & Howell",
  148.  2093,    -1,    -1, 1, "Bernd Culenfeld",
  149.  2084,    -1,    -1, 1, "Bestech",
  150.  2105,    -1,    -1, 1, "Beta Unlimited",
  151.  2069,    -1,    -1, 1, "Big Brother Security Systems",
  152.  1043,    -1,    -1, 1, "B. J. Freeman",
  153.  2098,    -1,    -1, 1, "Black Belt Systems",
  154.  1011,    -1,    -1, 1, "Bob Krauth",
  155.  2198,    -1,    -1, 1, "Bob Research Group",
  156.  2066,    -1,    -1, 1, "Bowden, Williams, Full & Assoc.",
  157.  2049,  2092,    -1, 2, "BSC (Elaborate Bytes)/Advanced Development Software",
  158.  2033,    -1,    -1, 1, "BVR",
  159.  2010,    -1,    -1, 1, "Byte Corp",
  160.  2050,    -1,    -1, 1, "C. Ltd",
  161.  2021,    -1,    -1, 0, "California Access (Synergy)",
  162.  2018,    -1,    -1, 1, "Calmos",
  163.  1055,    -1,    -1, 1, "Cardiac Pacemakers Inc.",
  164.  2095,    -1,    -1, 1, "CEGITES",
  165.  2074,    -1,    -1, 1, "The Checkered Ball",
  166.  2024,    -1,    -1, 1, "CH Electronics",
  167.  2114,    -1,    -1, 1, "C. H. Helfrich Electronik",
  168.  2082,    -1,    -1, 1, "Circum Design Inc.",
  169.  2077,    -1,    -1, 1, "Clartscreen Ltd. (UK)",
  170.  2044,    -1,    -1, 1, "Clearpoint Research",
  171.  1054,    -1,    -1, 1, "Cline Refrigeration",
  172. 26470, 49160,    -1, 0, "Combitec",
  173.   515,    -1,    -1, 0, "Combitech/MacroSystems USA",
  174.  2048,    -1,    -1, 1, "Commodore Braunschweig",
  175.   513,   514,    -1, 0, "Commodore Business Machines",
  176.  2134,    -1,    -1, 1, "Commodore Test Engineering Group",
  177.  1018,    -1,    -1, 1, "Computer Service Italia",
  178.  1026,  2052,    -1, 2, "Computer Tuning",
  179.  1006,    -1,    -1, 1, "Comspec Communications",
  180.  2204,    -1,    -1, 1, "Conspector Entertainment",
  181.  2182,    -1,    -1, 1, "CP Computer",
  182.  5011,    -1,    -1, 1, "Creative Development",
  183.  1058,    -1,    -1, 1, "CSA",
  184.  2122,    -1,    -1, 1, "Cumana",
  185.  2186,    -1,    -1, 1, "Cyborg Design Services",
  186.  2197,    -1,    -1, 1, "Cyon",
  187.  2029,    -1,    -1, 1, "Delaware Valley Software",
  188.  2161,    -1,    -1, 1, "Design Computer Systems",
  189.  1041,    -1,    -1, 1, "Design Labs",
  190.  1057,    -1,    -1, 1, "Diener, Wayne",
  191.  2060,    -1,    -1, 1, "Digital Art Systems",
  192.  2129,    -1,    -1, 1, "Digital Micronics",
  193.  2119,    -1,    -1, 1, "Digital Pacific",
  194.  2160,  2169,    -1, 2, "Digital Processing Systems",
  195.  2015,    -1,    -1, 1, "Digitronics",
  196.  2012,    -1,    -1, 1, "DKB Inc. (\"Michigan Software\")",
  197.  2129,    -1,    -1, 0, "DMI",
  198.  2019,    -1,    -1, 1, "Dover Research",
  199.  2064,    -1,    -1, 1, "Edotronik GmbH",
  200.  2206,    -1,    -1, 1, "Elbox Computer",
  201.  2174,    -1,    -1, 1, "Electronic Design",
  202.  2076,    -1,    -1, 1, "Elmtech Research Ltd. (UK)",
  203.  2005,    -1,    -1, 1, "Elthen Electronics",
  204.  2138,    -1,    -1, 1, "Evesham Micro Ltd.",
  205.  2096,    -1,    -1, 1, "EV Industries",
  206.  8290,    -1,    -1, 0, "Expansion Systems",
  207.  1014,  2062,    -1, 2, "Expansion Technologies (Pacific Cypress)",
  208.  2059,    -1,    -1, 1, "Expert Services",
  209.  2137,    -1,    -1, 1, "Faberushi",
  210.  2177,    -1,    -1, 1, "Ferranti",
  211.  2004,    -1,    -1, 1, "Finn R. Jacobsen",
  212.  4648,    -1,    -1, 1, "Flesch Hornemann Computer Elec.",
  213.  2125,    -1,    -1, 1, "For Your Eyes",
  214.  1015,    -1,    -1, 1, "Fuller Computers",
  215.  2201,    -1,    -1, 1, "Fulvio Ieva",
  216.  2187,    -1,    -1, 1, "G2 Systems",
  217.  1016,    -1,    -1, 1, "Galaxy Computers",
  218.  2079,    -1,    -1, 1, "Galysh Enterprises",
  219.  2081,    -1,    -1, 1, "GBS",
  220.  2142,    -1,    -1, 1, "GfxBase Inc.",
  221.  2109,    -1,    -1, 1, "Gigatron OHG",
  222.  2040,    -1,    -1, 1, "GIT",
  223.  2180,    -1,    -1, 1, "GPSoft Pty. Ltd.",
  224.  1051,    -1,    -1, 1, "GRC Electronics",
  225.  2017,  1761,  2193, 1, "Great Valley Peripherals",
  226.  2011,    -1,    -1, 0, "Hacker",
  227.  2158,    -1,    -1, 1, "HAL Software Hardware Handel",
  228.  2560,    -1,    -1, 0, "Harms",
  229.  2166,    -1,    -1, 1, "Hamren, Thomas",
  230.  2192,    -1,    -1, 1, "Hardware Design Udo Neuroth",
  231.  2195,    -1,    -1, 0, "Helfrich",
  232.  2075,    -1,    -1, 1, "Hi Tension Computer Services Ltd. (UK)",
  233.  2113,    -1,    -1, 1, "H. K. Computers",
  234.  2141,    -1,    -1, 1, "Hohabir, Daniel",
  235.  2038,    -1,    -1, 1, "Howitch",
  236.  1007,    -1,    -1, 1, "HT Electronics",
  237.  2121,    -1,    -1, 0, "Hydra Systems",
  238.  2071,    -1,    -1, 1, "ICD Inc.",
  239.  2133,    -1,    -1, 1, "Icom Simulations",
  240.  2104,    -1,    -1, 1, "Impulse Inc.",
  241.  2031,    -1,    -1, 1, "Incognito Software",
  242.  4626,    -1,    -1, 1, "Individual Computers",
  243.  1047,    -1,    -1, 1, "Industrial Support Services",
  244.  2151,    -1,    -1, 1, "Infinity Systems Design Group",
  245.  1025,    -1,    -1, 1, "Ing. Buero Kalawsky",
  246.  2195,    -1,    -1, 1, "Ingenieurbuero Helfrich",
  247.  2112,    -1,    -1, 1, "Interactive Video Systems",
  248.  1027,    -1,    -1, 1, "Interplan Unternehmensberatung",
  249.  2078,    -1,    -1, 1, "Interworks/Network",
  250.  2184,    -1,    -1, 1, "ITEK Neser & Sieber GbR",
  251.  5000,    -1,    -1, 1, "ITH",
  252.  2087,    -1,    -1, 1, "Ivis",
  253.  2112,    -1,    -1, 0, "IVS",
  254.  2032,    -1,    -1, 1, "Jadesign",
  255.  2175,    -1,    -1, 1, "James Cook University of North Queensland",
  256.  2052,    -1,    -1, 0, "Jochheim",
  257.  2180,    -1,    -1, 1, "Juergen Kommos",
  258.  2123,    -1,    -1, 1, "KAPS 2C Conception",
  259.  2009,    -1,    -1, 1, "Kochler, Roland",
  260.  2045,    -1,    -1, 1, "Kodiak",
  261.  2020,    -1,    -1, 1, "Krehbiel, David",
  262.  2043,    -1,    -1, 1, "Kruse, Ralph",
  263.  2073,  4680,    -1, 1, "Kupke Computertechnik GmbH/Golem",
  264.  1052,    -1,    -1, 1, "Lai, David",
  265.  2085,    -1,    -1, 1, "Lasar Fantasy",
  266.  2205,    -1,    -1, 1, "Laserforum",
  267.  2185,    -1,    -1, 1, "Lello, Phillip C.",
  268.  2178,    -1,    -1, 1, "Leviathan Development",
  269.  2065,    -1,    -1, 1, "Logical Design Works",
  270.  1030,    -1,    -1, 0, "Lowell University/Commodore Business Machines",
  271.  1060,    -1,    -1, 1, "Lucas, David",
  272.  2156,  4754,    -1, 2, "MacroSystems",
  273.   256, 18260,    -1, 0, "MacroSystems USA",
  274.  2159,    -1,    -1, 0, "Mainhattan-Data (A-Team)",
  275.  1081,    -1,    -1, 0, "Marc Michael Groth",
  276.  2194,    -1,    -1, 1, "Marpet Developments",
  277.  2157,    -1,    -1, 1, "Masoboshi GmbH",
  278.  2124,    -1,    -1, 1, "Mason, Mike",
  279.  1042,    -1,    -1, 1, "MCS",
  280.  2106,    -1,    -1, 1, "Memory Expansion Systems Ltd.",
  281.  2159,    -1,    -1, 1, "Michael Lamm Computersysteme",
  282.  1010,    -1,    -1, 1, "MicroBotics",
  283.  2135,    -1,    -1, 1, "Microcreations",
  284.  2042,    -1,    -1, 1, "Micro E Ab",
  285.  1003,    -1,    -1, 1, "The Micro-Forge",
  286.  2023,    -1,    -1, 1, "Micron Technology",
  287.  1020,    -1,    -1, 1, "Micro-Solutions Inc.",
  288.  2203,    -1,    -1, 1, "Micro System Devices",
  289.  2002,    -1,    -1, 1, "Mimetics Corp.",
  290.  1013,    -1,    -1, 1, "Mini Comp Systems Ltd.",
  291.  2189,    -1,    -1, 1, "MSPI (Markt & Technik)",
  292.  2131,    -1,    -1, 1, "Multigros A/S",
  293.  2072,    -1,    -1, 1, "Multi-Meg Electronique",
  294.  2196,    -1,    -1, 1, "The Neo Group",
  295.  2067,    -1,    -1, 1, "NES Inc.",
  296.  2111,    -1,    -1, 1, "New Technologies Group",
  297.  2191,    -1,    -1, 1, "NewTek",
  298.  2006,    -1,    -1, 1, "Nine Tiles Computer Systems Ltd.",
  299.  2181,    -1,    -1, 1, "O. Bausch",
  300.  1028,    -1,    -1, 1, "Ohlich, Peter",
  301.  1045,    -1,    -1, 1, "Oklahoma Personal Comp.",
  302.  2145,    -1,    -1, 1, "Omega Datentechnik",
  303.  2165,    -1,    -1, 1, "Overland Engineering",
  304.  2013,   211,    -1, 1, "Pacific Peripherals",
  305.  2030,    -1,    -1, 1, "Palomax",
  306.  2139,    -1,    -1, 1, "Panagolin Laser Software",
  307.  2110,    -1,    -1, 1, "PG Electronics",
  308.  2172,  8512,    -1, 1, "phase 5",
  309.  2046,  2101, 46504, 2, "Phoenix Electronics",
  310.  2108,    -1,    -1, 1, "Platypus Systems",
  311.  2155,    -1,    -1, 1, "Power Computing Ltd.",
  312.  2102,    -1,    -1, 1, "Preferred Technology",
  313.  1030,    -1,    -1, 1, "Productivity Center",
  314.  2026,   756,    -1, 1, "Progressive Peripherals and Software",
  315.  1049,    -1,    -1, 1, "Prolific Inc.",
  316.  2188,    -1,    -1, 1, "Pro System ComputerSysteme",
  317.  2148,    -1,    -1, 1, "Protar Electronics",
  318.  2086,    -1,    -1, 1, "Pulsar",
  319.  1267,    -1,    -1, 1, "RBM Digitaltechnik",
  320.  1008,    -1,    -1, 1, "RDS Software",
  321.  2100,  8448,    -1, 1, "ReadySoft",
  322.  2080,    -1,    -1, 1, "Realtime Games Software Ltd.",
  323. 43437,    -1,    -1, 0, "Reis-Ware",
  324.  2199,    -1,    -1, 1, "Richmond Sound Design Ltd.",
  325.  2144,    -1,    -1, 1, "Roctec Electronics Inc.",
  326.  2103,    -1,    -1, 1, "Rombo Productions",
  327.  1028,  4136,    -1, 0, "Ronin/Imtronics",
  328.  2140,    -1,    -1, 1, "Rudloff, Thomas",
  329.  8704,    -1,    -1, 0, "Sang/CT",
  330.  2128,    -1,    -1, 1, "Scott Advanced Micro Designs",
  331.  2037,    -1,    -1, 1, "Scott Karlin",
  332.  2208,    -1,    -1, 1, "SDL Ltd.",
  333.  2091,    -1,    -1, 1, "Seaview Software",
  334.  2055,    -1,    -1, 0, "Serial Solutions (Checkpoint Technologies)",
  335.  2136,    -1,    -1, 1, "Shoestring Productions",
  336.  1044,    -1,    -1, 1, "Side Effects Inc.",
  337.  2097,    -1,    -1, 1, "Silicon Peace",
  338.  2202,    -1,    -1, 1, "Silicon Studio",
  339.  2058,    -1,    -1, 1, "Sir Netics",
  340.  1050,    -1,    -1, 1, "Softeam Inc.",
  341.  2089,  2120,    -1, 2, "Solid State Design & Development/Solid State Leisure",
  342. 32768,    -1,    -1, 0, "SKI Peripherals",
  343.  2147,    -1,    -1, 1, "Skytec Computers",
  344.  2051,    -1,    -1, 1, "Spartanics",
  345.  2034,  2035,    -1, 2, "Spirit Technology",
  346.  2150,    -1,    -1, 0, "SRE",
  347.  1021,    -1,    -1, 1, "Stacar International",
  348.  2162,    -1,    -1, 1, "The Station",
  349.  2039,    -1,    -1, 1, "Sullivan Brothers Visual Engineers",
  350.  2164,  2170,    -1, 2, "Superformance Computer Engineering GmbH",
  351.  2127,    -1,    -1, 1, "Sunrize Industries",
  352.  2153,    -1,    -1, 1, "Suntec Inc.",
  353.  1056,  1004,    -1, 2, "Supra Corp. (Creative Microsystems)", // 1004 is also unofficially claimed by C. Ltd
  354.  2021,    -1,    -1, 1, "Synergy Peripheral Systems",
  355.  2014,    -1,    -1, 1, "Sysaphus Software",
  356.  1048,    -1,    -1, 1, "Technisoft",
  357.  1001,    -1,    -1, 1, "Tecmar",
  358.  1002,    -1,    -1, 1, "Telesys",
  359.  2168,    -1,    -1, 1, "Toolbox Design",
  360.  2152,    -1,    -1, 1, "Trade It",
  361.  2053,    -1,    -1, 1, "Trans Data Systems",
  362.  2128,    -1,    -1, 0, "Triceratops",
  363.  2154,    -1,    -1, 1, "Tritec Marketing",
  364.  1059,    -1,    -1, 1, "Trionix Inc.",
  365.  2179,    -1,    -1, 1, "United Video Inc.",
  366.  2150,    -1,    -1, 1, "University of Illinois",
  367.  2200,    -1,    -1, 1, "US Cybernetics",
  368.  2171,    -1,    -1, 1, "Utilities Unlimited",
  369.  1022,    -1,    -1, 1, "Video Precisions",
  370.  2167,    -1,    -1, 1, "Village Tronic",
  371.  2193,    -1,    -1, 1, "Viona Developments",
  372.  2090,    -1,    -1, 1, "Vision Quest",
  373.  2126,    -1,    -1, 1, "Volkmar Breitfeld Computersysteme",
  374.  2107,  8215,    -1, 1, "Vortex Computer Systems GmbH",
  375.  5001,    -1,    -1, 1, "VMC",
  376.  2027,    -1,    -1, 1, "Wicat Systems",
  377.  2163,    -1,    -1, 1, "Williams, Bryan",
  378.  2115,    -1,    -1, 1, "Xanadu",
  379.  2022,    -1,    -1, 1, "Xetec",
  380.  2117,    -1,    -1, 1, "X-Pert",
  381.  2099,    -1,    -1, 1, "Yaeger, Steve",
  382.  2047,    -1,    -1, 1, "?", // `no name shown'
  383. };
  384.  
  385. #define PRODUCTS 174
  386. struct
  387. {   ULONG  manufid,
  388.            number[2];
  389.     STRPTR name;
  390.     STRPTR desc;
  391. } product[PRODUCTS + 1] =
  392. {
  393.  2026, 150,  -1, "Zeus 040",                            "68040 accelerator + 32-bit expansion memory + SCSI host adapter", 1056,  12,  -1, "WordSync HD Interface",               "SCSI host adapter",
  394.  2203,  19,  -1, "Warp Engine",                         "68040 accelerator + 32-bit expansion memory",
  395.   256,  19,  -1, "Warp Engine",                         "68040 accelerator + 32-bit expansion memory",
  396.  1010,  68,  -1, "VXL RAM*32",                          "32-bit expansion memory",
  397.  1010,  69,  -1, "VXL 30",                              "68030/6888x accelerator",
  398.  2064,   8,  -1, "VME-Bus Controller",                  "VME-bus interface board",
  399. 18260,   4,  -1, "VLab Y/UV Digitizer",                 "Video digitizer board",
  400.  2117,   2,  -1, "Visiona",                             "Graphics board (I/O area)",
  401.  2117,   1,  -1, "Visiona",                             "Graphics board (memory area)",
  402.  2113, 227,  -1, "Vektor I/O",                          "I/O board",
  403.  2112, 243,  -1, "Vector",                              "68030/68882 accelerator + 32-bit expansion memory",
  404.  2112,  48,  -1, "TrumpCard Classic",                   "SCSI host adapter",
  405.  2112,  52,  -1, "TrumpCard Pro/Grand Slam",            "SCSI host adapter",
  406.  1056,  10,  -1, "SupraRAM",                            "16-bit expansion memory",
  407.  1056,   1,  -1, "SupraDrive 4x4 SCSI",                 "SCSI host adapter",
  408.  1010,   2,  -1, "StarDrive",                           "SCSI host adapter",
  409.  1010,   0,  -1, "StarBoard 2",                         "16-bit expansion memory",
  410. 46504,  33,  -1, "ST506 Autoboot",                      "MFM controller",
  411.  2101,  33,  -1, "ST506 Autoboot",                      "MFM controller",
  412. 49160,  43,  -1, "SRAM Card",                           "Memory board",
  413.  2034,   3,  -1, "SIN500",                              "16-bit expansion memory",
  414.  2012,   9,  -1, "SecureKey",                           "Access control board",
  415. 32768, 128,  -1, "SCSI + Dual Serial",                  "SCSI host adapter/serial board",
  416. 46504,  34,  -1, "SCSI Autoboot",                       "SCSI host adapter",
  417.  2101,  34,  -1, "SCSI Autoboot",                       "SCSI host adapter",
  418.  2073,   2,  -1, "SCSI",                                "SCSI host adapter",
  419. 43437,  17,  -1, "Scan King",                           "Scanner",
  420.   514,  96,  -1, "Romulator",                           "?",
  421. 18260,  16,  -1, "Retina Z3",                           "Graphics board",
  422. 18260,   6,  -1, "Retina",                              "Graphics board",
  423.  2129,   1,  -1, "Resolver",                            "Graphics board",
  424.  2088,  16,  -1, "RAM Works",                           "16-bit expansion memory",
  425.  2052,   1,  -1, "RAM Board",                           "16-bit expansion memory",
  426.  2022,   2,  -1, "RAM Board",                           "16-bit expansion memory",
  427.  1023,   1,   2, "RAM Board",                           "16-bit expansion memory",
  428.  2011,   2,  -1, "Quicknet QN2000",                     "Ethernet LAN board",
  429.  2064,   6,  -1, "PIC Prototyping Board",               "Prototyping board",
  430.  2195,  11,  -1, "Piccolo SD64",                        "Graphics board (I/O area)",
  431.  2195,  10,  -1, "Piccolo SD64",                        "Graphics board (memory area)",
  432.  2195,   6,  -1, "Piccolo",                             "Graphics board (I/O area)",
  433.  2195,   5,  -1, "Piccolo",                             "Graphics board (memory area)",
  434.  2167,  13,  -1, "Picasso ][",                          "Graphics board (segmented area)",
  435.  2167,  12,  -1, "Picasso ][",                          "Graphics board (I/O area)",
  436.  2167,  11,  -1, "Picasso ][",                          "Graphics board (memory area)",
  437.  2112,  16,  -1, "OverDrive",                           "SCSI host adapter",
  438.  4680,   1,  -1, "Omti HD Controller",                  "MFM controller",
  439.  2073,   1,  -1, "Omti HD Controller",                  "MFM controller",
  440.  2092,   5,  -1, "Oktagon",                             "SCSI host adapter",
  441.  2034,   6,  -1, "OctaByte",                            "16-bit expansion memory",
  442.  2102,   1,  -1, "Nexus",                               "SCSI host adapter",
  443.  2128,   1,  -1, "Multiport I/O",                       "I/O board",
  444.  2176,   1,  -1, "Multi-I/O",                           "I/O board",
  445.  2092,  16,  17, "MultiFaceCard",                       "Serial/parallel board",
  446.  2092,  18,  -1, "MultiFaceCard ]I[",                   "Serial/parallel board",
  447.  2112,  64,  -1, "Meta-4",                              "16-bit expansion memory",
  448.  2092,   8,  -1, "Memory Master",                       "16-bit expansion memory",
  449.  2073,   3,  -1, "Memory Expansion",                    "16-bit expansion memory",
  450. 46504, 190,  -1, "Memory Board",                        "16-bit expansion memory",
  451.  2101, 190,  -1, "Memory Board",                        "16-bit expansion memory",
  452.  1010, 129, 193, "MBX 1200",                            "32-bit expansion memory",
  453.  2021,   1,  -1, "Malibu SCSI",                         "SCSI host adapter",
  454.  1058,  17,  -1, "Magnum 040",                          "68040 accelerator + 32-bit expansion memory",
  455.  8704,   1,  -1, "Link-Interface",                      "Transputer link interface",
  456.  1005,   1,  -1, "LIVE! A2000",                         "Video digitizer board",
  457.  2050,   4,  -1, "Kronos 2000",                         "SCSI host adapter",
  458.  1004,   4,  -1, "Kronos 2000",                         "SCSI host adapter",
  459.  2092,  65,  -1, "ISDN-Master",                         "ISDN board",
  460.  2034,   1,  -1, "Insider IN1000",                      "16-bit expansion memory",
  461.  2034,   2,  -1, "Insider IN500",                       "16-bit expansion memory",
  462.  2034,   8,  -1, "Inmate SCSI/FPU/RAM",                 "?",
  463.  2017,  32,  -1, "Impact Vision 24",                    "Graphics board",
  464.  2017,  11,  -1, "Impact Series ][ SCSI (DPRC)",        "SCSI host adapter (or I/O extender)",
  465.  2017,   3,  -1, "Impact Series I SCSI 16K/3",          "SCSI host adapter",
  466.  2017,   2,  -1, "Impact Series I SCSI 16K/2",          "SCSI host adapter",
  467.  2017,   1,  -1, "Impact Series I SCSI 4K",             "SCSI host adapter",
  468.  1761,   8,  -1, "Impact SCSI",                         "SCSI host adapter",
  469.  2017,   8,  13, "Impact A3001 IDE HD",                 "68030/68882 accelerator + IDE controller",
  470.  2064,   1,  -1, "IEEE-488 Controller",                 "IEEE-488 interface board",
  471.  2159,   1,  -1, "IDE",                                 "IDE controller",
  472.  2121,   1,  -1, "Hydra Ethernet",                      "Ethernet LAN board",
  473.  4136,  57,  87, "Hurricane 2800",                      "68030/6888x accelerator + 32-bit expansion memory",
  474.  1028,  57,  87, "Hurricane 2800",                      "68030/6888x accelerator + 32-bit expansion memory",
  475.  2064,   3,  -1, "High-Speed Multiserial Interface",    "Serial board",
  476.   211,  10,  -1, "HD Controller",                       "SCSI host adapter",
  477. 49160,  42,  -1, "HD Controller",                       "SCSI host adapter",
  478.  2034,   4,  -1, "HDA-506",                             "MFM controller",
  479.  1010, 150, 158, "HardFrame/2000",                      "SCSI host adapter",
  480.  2112,   4,  -1, "GrandSlam",                           "SCSI/parallel/serial board",
  481.  1023, 255,  -1, "GPIB or Dual Serial Board",           "IEEE-488 or Twin-X serial card",
  482.  8215,   8,  -1, "GoldenGate 386SX RAM",                "80386SX bridgeboard/Amiga shared RAM",
  483.  8215,   7,  -1, "GoldenGate 386SX",                    "80386SX bridgeboard",
  484.  2150,   1,  -1, "GoldenGate ][",                       "Zorro ][-ISA bridgeboard",
  485.  2017, 255,  -1, "G-Force 040 I/O ('040/2000)",         "Serial/parallel board",
  486.  2142,   0,  -1, "GDA-1 VRAM",                          "Graphics board",
  487.  2142,   1,  -1, "GDA-1",                               "Graphics board",
  488.  2104,   0,  -1, "Firecracker",                         "Frame buffer",
  489.  2092,  32,  -1, "Frame Buffer",                        "Graphics board",
  490.  2022,   1,  -1, "FastTrak HD",                         "SCSI host adapter",
  491.  8512,  10,  -1, "FastLane Z3",                         "SCSI host adapter + 32-bit expansion memory",
  492.  2022,   3,  -1, "FastCard + HD Controller",            "?",
  493.  2067,   0,  -1, "Expansion RAM",                       "16-bit expansion memory",
  494.   756,   2,  -1, "EXP8000",                             "16-bit expansion memory",
  495.  1053,   1,  -1, "Ethernet",                            "Ethernet LAN board",
  496.  2193,   1,  -1, "EGS Spectrum",                        "Graphics board (I/O area)",
  497.  2193,   2,  -1, "EGS Spectrum",                        "Graphics board (memory area)",
  498.  1004,  14,  -1, "Escort",                              "SCSI host adapter",
  499.  1023, 254,  -1, "EB-920 LanRover",                     "Ethernet LAN board",
  500.  1009,   1,  -1, "Easyl",                               "Graphics tablet",
  501.  2064,   9,  -1, "DSP96000 Real Time Data Acquisition", "Data acquisition board",
  502.  2088,  16,  -1, "DL2000",                              "Modem",
  503.  2055,   0,  -1, "Dual Port Serial",                    "Serial board",
  504.  2129,   6,  -1, "Digital Broadcaster 32",              "Image processing board",
  505.  8290,   1,  -1, "DataFlyer 500 SCSI",                  "SCSI host adapter",
  506.  8512,  34,  -1, "CyberVision 64",                      "Graphics board",
  507.  8512,  11,  -1, "CyberStorm",                          "68040 accelerator + 32-bit expansion memory",
  508.  2176,   2,  -1, "CD-RAM",                              "16-bit expansion memory",
  509.  2010,   0,  -1, "Byte Box A500",                       "?",
  510.  8512,  24,  -1, "Blizzard A2060",                      "68060 accelerator + 32-bit expansion memory",
  511.  8512,  17,  -1, "Blizzard 1230",                       "68030/68882 accelerator + 32-bit expansion memory",
  512.  8512,   2,  -1, "Blizzard Turbo",                      "Accelerator board (I/O area)",
  513.  8512,   1,  -1, "Blizzard Turbo",                      "Accelerator board (memory area)",
  514.  2034,   5,  -1, "AX-S IBM Hardware I/O Board",         "I/O board",
  515.  1006,   1,  -1, "AX2000",                              "16-bit expansion memory",
  516.  8448,   1,  -1, "A-Max ][+/A-Max IV",                  "Macintosh emulation board",
  517.  2049,   3,  -1, "ALF 3 SCSI",                          "SCSI host adapter",
  518.  2049,   2,  -1, "ALF 2 SCSI",                          "SCSI host adapter",
  519.  2049,   1,  -1, "ALF 2",                               "MFM controller",
  520.  2071,   1,  -1, "Advantage 2000/AdSCSI",               "SCSI host adapter",
  521.  2167, 201,  -1, "Adriadne",                            "Ethernet LAN + I/O board",
  522.  2071,   4,  -1, "AdRAM 2080",                          "16-bit expansion memory",
  523.  2071,   3,  -1, "AdIDE",                               "IDE controller",
  524.   514,  84,  -1, "A4091",                               "SCSI host adapter",
  525.  1053,  10,  -1, "A4066",                               "Ethernet LAN board",
  526.   514,  97,  -1, "A3000 test fixture",                  "?",
  527.   514,  81,  -1, "A2630",                               "68030/68882 accelerator + 32-bit expansion memory",
  528.   514,  80,  -1, "A2620",                               "68020/68851/6888x accelerator + 32-bit expansion memory",
  529.  1030,   0,  -1, "A2410",                               "Graphics board",
  530.   513, 103,  -1, "A2386SX",                             "80386SX bridgeboard",
  531.   513,   2,  -1, "A2286",                               "80286 bridgeboard",
  532.   514,  70,  -1, "A2232",                               "Serial board",
  533.   514,  69,  -1, "A2232 prototype",                     "Serial board",
  534.   514,   3,  -1, "A2091",                               "SCSI host adapter",
  535.   514,   4,  -1, "A2090B",                              "Autoboot card",
  536.   515,   3,  -1, "A2090/A2090A",                        "MFM controller + SCSI host adapter with new driver",
  537.   514,   1,  -1, "A2090/A2090A",                        "MFM controller + SCSI host adapter",
  538.   513,   1,  -1, "A2088/A2286",                         "8088/80286 bridgeboard",
  539.   514, 112,  -1, "A2065",                               "Ethernet LAN board",
  540.  1053,   9,  -1, "A2060 Arcnet",                        "Arcnet LAN board",
  541.   514,   9,  -1, "A2060",                               "Arcnet LAN board",
  542.   514,  10,  -1, "A205x/A2091/A590",                    "16-bit expansion memory",
  543.  2560, 208,  -1, "A2000 Turboboard 3500 Professional",  "68030/68882 accelerator + 32-bit expansion memory",
  544.  1056,   3,  -1, "A2000 DMA HD Interface",              "SCSI host adapter",
  545.  2017,  22,  -1, "A2000 060 Combo",                     "68060 accelerator + 32-bit expansion memory",
  546.  1004,  12,  -1, "A1000/A2000 SCSI",                    "SCSI host adapter",
  547.  2050,  12,  -1, "A1000 SCSI",                          "SCSI host adapter",
  548.  1056,   2,  -1, "A1000 RAM Expansion",                 "16-bit expansion memory",
  549.   514,   2,  -1, "A590",                                "SCSI host adapter/XT controller",
  550.   514,  32,  -1, "A560",                                "16-bit expansion memory",
  551.  1056,  13,  -1, "A500 ByteSync HD Interface",          "SCSI host adapter",
  552.  1056,   8,  -1, "A500 Autoboot HD Interface",          "SCSI host adapter",
  553.  2073,   5,  -1, "68030 (asynchronous)",                "68030/6888x accelerator",
  554.  2073,   4,  -1, "68030 (synchronous)",                 "68030/6888x accelerator",
  555.  2064,   2,  -1, "8032 Development Adapter",            "CBM-8032 board?",
  556.  1056,  16,  -1, "2400zi+",                             "Modem",
  557.  1056,  11,  -1, "2400zi",                              "Modem",
  558.  1056,   9,  -1, "500/2000 RX",                         "16-bit expansion memory",
  559.  1056,   5,  -1, "500 HD/RAM",                          "SCSI host adapter + 16-bit expansion memory",
  560.  2026, 105,  -1, "040/A2000 Board",                     "68040 accelerator + 32-bit expansion memory",
  561.  2064,   5,  -1, "32-Bit Parallel I/O Interface",       "Parallel board",
  562.  2064,   4,  -1, "24-Bit Real Time Video Digitizer",    "Video digitizer board",
  563.  2064,   7,  -1, "16-Channel ADC Interface",            "Analog to digital board",
  564.  1058,  21,  -1, "12 Gauge",                            "68030/68882 accelerator + 32-bit expansion memory",
  565.  1010,   4,  -1, "8-UP! (Z)",                           "16-bit expansion memory",
  566.  1010,   3,  -1, "8-UP! (A)",                           "16-bit expansion memory"
  567. };
  568.  
  569. MODULE void runquery(ULONG whichmanuf, ULONG whichproduct)
  570. {   /* This function takes a manufacturer and product ID and attempts
  571.     to update the text gadgets with a relevant text description.
  572.  
  573.     If ~0 (-1) is passed for either the manufacturer or product ID,
  574.     the function returns immediately without doing anything. */
  575.  
  576.     selectedmanuf   =
  577.     selectedproduct = (UWORD) ~0;
  578.  
  579.     if (whichmanuf == (ULONG) ~0 || whichproduct == (ULONG) ~0)
  580.     {   return;
  581.     }
  582.  
  583.     SetGadgetAttrs
  584.     (   manuf_gadgets[GID_5_CB1], MainWindowPtr, NULL,
  585.         GA_Selected, FALSE,
  586.         TAG_END
  587.     );
  588.     SetGadgetAttrs
  589.     (   manuf_gadgets[GID_5_CB2], MainWindowPtr, NULL,
  590.         GA_Selected, FALSE,
  591.         TAG_END
  592.     );
  593.  
  594.     if (precedence == 1)
  595.     {   checkinternal(whichmanuf, whichproduct);
  596.         if (foundmanuf) // found int. manuf, maybe int. product
  597.         {   if (!foundproduct) // found int. manuf but not int. product
  598.             {   noproduct();
  599.         }   }
  600.         else
  601.         {   checklibrary(whichmanuf, whichproduct);
  602.             if (!foundmanuf)
  603.             {   nomanuf();
  604.                 noproduct();
  605.     }   }   }
  606.     else
  607.     {   assert(precedence == 0);
  608.         checklibrary(whichmanuf, whichproduct);
  609.         if (!foundmanuf) // can't find lib. manuf/product
  610.         {   checkinternal(whichmanuf, whichproduct);
  611.             if (foundmanuf) // found int. manuf, maybe int. product
  612.             {   if (!foundproduct) // found int. manuf but not int. product
  613.                 {   noproduct();
  614.             }   }
  615.             else
  616.             {   nomanuf();
  617.                 noproduct();
  618. }   }   }   }
  619.  
  620. MODULE void updatemanuf(void)
  621. {   TEXT  output[13 + 1];
  622.     ULONG i;
  623.  
  624.     if (whichboard == 0)
  625.     {   SetGadgetAttrs
  626.         (   manuf_gadgets[GID_5_BU1], MainWindowPtr, NULL,
  627.             GA_Disabled, TRUE,
  628.             TAG_END
  629.         );
  630.     } else
  631.     {   SetGadgetAttrs
  632.         (   manuf_gadgets[GID_5_BU1], MainWindowPtr, NULL,
  633.             GA_Disabled, FALSE,
  634.             TAG_END
  635.         );
  636.     }
  637.  
  638.     if (whichboard < boards)
  639.     {   SetGadgetAttrs // next card
  640.         (   manuf_gadgets[GID_5_BU2], MainWindowPtr, NULL,
  641.             GA_Disabled, FALSE,
  642.             TAG_END
  643.         );
  644.         SetGadgetAttrs // manuf ID
  645.         (   manuf_gadgets[GID_5_IN1], MainWindowPtr, NULL,
  646.             GA_Disabled, TRUE,
  647.             INTEGER_Number, board[whichboard].manuf,
  648.             TAG_END
  649.         );
  650.         SetGadgetAttrs // product ID
  651.         (   manuf_gadgets[GID_5_IN2], MainWindowPtr, NULL,
  652.             GA_Disabled, TRUE,
  653.             INTEGER_Number, board[whichboard].product,
  654.             TAG_END
  655.         );
  656.         stcl_d(cardnumber, whichboard + 1);
  657.         SetGadgetAttrs // card
  658.         (   manuf_gadgets[GID_5_ST1], MainWindowPtr, NULL,
  659.             STRINGA_TextVal, cardnumber,
  660.             TAG_END
  661.         );
  662.  
  663.         output[0] = '$';
  664.  
  665.         stcl_h(&output[1], (ULONG) board[whichboard].ConfigDevPtr);
  666.         SetGadgetAttrs
  667.         (   manuf_gadgets[GID_5_ST5], MainWindowPtr, NULL,
  668.             STRINGA_TextVal, output,
  669.         TAG_END);
  670.  
  671.         stcl_h(&output[1], (ULONG) board[whichboard].Driver);
  672.         SetGadgetAttrs
  673.         (   manuf_gadgets[GID_5_ST6], MainWindowPtr, NULL,
  674.             STRINGA_TextVal, output,
  675.         TAG_END);
  676.  
  677.         stcl_h(&output[1], board[whichboard].SerialNumber);
  678.         SetGadgetAttrs
  679.         (   manuf_gadgets[GID_5_ST7], MainWindowPtr, NULL,
  680.             STRINGA_TextVal, output,
  681.         TAG_END);
  682.  
  683.         stcl_h(&output[1], (ULONG) board[whichboard].BoardAddr);
  684.         SetGadgetAttrs
  685.         (   manuf_gadgets[GID_5_ST8], MainWindowPtr, NULL,
  686.             STRINGA_TextVal, output,
  687.         TAG_END);
  688.  
  689.         stcl_h(&output[1], board[whichboard].BoardSize);
  690.         SetGadgetAttrs
  691.         (   manuf_gadgets[GID_5_ST9], MainWindowPtr, NULL,
  692.             STRINGA_TextVal, output,
  693.         TAG_END);
  694.  
  695.         stcl_h(&output[1], (ULONG) board[whichboard].SlotAddr);
  696.         SetGadgetAttrs
  697.         (   manuf_gadgets[GID_5_ST10], MainWindowPtr, NULL,
  698.             STRINGA_TextVal, output,
  699.         TAG_END);
  700.  
  701.         stcl_h(&output[1], (ULONG) board[whichboard].SlotSize);
  702.         SetGadgetAttrs
  703.         (   manuf_gadgets[GID_5_ST11], MainWindowPtr, NULL,
  704.             STRINGA_TextVal, output,
  705.         TAG_END);
  706.     } else
  707.     {   SetGadgetAttrs // next card
  708.         (   manuf_gadgets[GID_5_BU2], MainWindowPtr, NULL,
  709.             GA_Disabled, TRUE,
  710.             TAG_END
  711.         );
  712.         SetGadgetAttrs // manuf ID
  713.         (   manuf_gadgets[GID_5_IN1], MainWindowPtr, NULL,
  714.             GA_Disabled, FALSE,
  715.             INTEGER_Number, querymanuf,
  716.             TAG_END
  717.         );
  718.         SetGadgetAttrs // product ID
  719.         (   manuf_gadgets[GID_5_IN2], MainWindowPtr, NULL,
  720.             GA_Disabled, FALSE,
  721.             INTEGER_Number, queryproduct,
  722.             TAG_END
  723.         );
  724.         SetGadgetAttrs // card
  725.         (   manuf_gadgets[GID_5_ST1], MainWindowPtr, NULL,
  726.             STRINGA_TextVal, "Queryable",
  727.             TAG_END
  728.         );
  729.  
  730.         for (i = 0; i <= 6; i++)
  731.         {   SetGadgetAttrs
  732.             (   manuf_gadgets[GID_5_ST5 + i], MainWindowPtr, NULL,
  733.                 STRINGA_TextVal, "-",
  734.             TAG_END);
  735.     }   }
  736.     runquery(board[whichboard].manuf, board[whichboard].product);
  737. }
  738.  
  739. AGLOBAL void manuf1(void)
  740. {   struct ConfigDev* ThisConfigDev;
  741.     ULONG             i, bufferoffset, stringoffset;
  742.     struct Hook       Hook5Struct;
  743.     TEXT              cpustring[MEDFIELD + 1], fpustring[MEDFIELD + 1];
  744.     
  745.     NewList(&ManufChooserList);
  746.     for (i = 0; i <= 1; i++)
  747.     {   if (!(ManufChooserNodePtr[i] = (struct ChooserNode *) AllocChooserNode(CNA_Text, ManufOptions[i], TAG_DONE)))
  748.         {   rq("Can't allocate chooser node!");
  749.         }
  750.         AddTail(&ManufChooserList, (struct Node *) ManufChooserNodePtr[i]);
  751.     } // automatically freed by ReAction at DisposeObject() time
  752.  
  753.     if (ExpansionBase = (struct ExpansionBase *) OpenLibrary(EXPANSIONNAME, 0))
  754.     {   /* Use FindConfigDev() to get info on the first expansion board on
  755.         the list maintained by Exec. */
  756.  
  757.         if (ThisConfigDev = FindConfigDev(NULL, -1, -1))
  758.         {   board[0].manuf        = ThisConfigDev->cd_Rom.er_Manufacturer;
  759.             board[0].product      = ThisConfigDev->cd_Rom.er_Product;
  760.             board[0].ConfigDevPtr = ThisConfigDev;                         // struct ConfigDev*
  761.             board[0].BoardAddr    = ThisConfigDev->cd_BoardAddr;           // APTR
  762.             board[0].BoardSize    = ThisConfigDev->cd_BoardSize;           // ULONG
  763.             board[0].SlotAddr     = ThisConfigDev->cd_SlotAddr;            // UWORD
  764.             board[0].SlotSize     = ThisConfigDev->cd_SlotSize;            // UWORD
  765.             board[0].Driver       = ThisConfigDev->cd_Driver;              // APTR
  766.             board[0].SerialNumber = ThisConfigDev->cd_Rom.er_SerialNumber; // ULONG
  767.             boards = 1;
  768.  
  769.             /* OK, there is at least one board, so loop and get the
  770.             entire list. */
  771.             while (ThisConfigDev = FindConfigDev(ThisConfigDev, -1, -1))
  772.             {   board[boards].manuf        = ThisConfigDev->cd_Rom.er_Manufacturer;
  773.                 board[boards].product      = ThisConfigDev->cd_Rom.er_Product;
  774.                 board[boards].ConfigDevPtr = ThisConfigDev;                         // struct ConfigDev*
  775.                 board[boards].BoardAddr    = ThisConfigDev->cd_BoardAddr;           // APTR
  776.                 board[boards].BoardSize    = ThisConfigDev->cd_BoardSize;           // ULONG
  777.                 board[boards].SlotAddr     = ThisConfigDev->cd_SlotAddr;            // UWORD
  778.                 board[boards].SlotSize     = ThisConfigDev->cd_SlotSize;            // UWORD
  779.                 board[boards].Driver       = ThisConfigDev->cd_Driver;              // APTR
  780.                 board[boards].SerialNumber = ThisConfigDev->cd_Rom.er_SerialNumber; // ULONG
  781.                 boards++;
  782.         }   }
  783.         else boards = 0;
  784.         CloseLibrary((struct Library *) ExpansionBase);
  785.     }
  786.  
  787.     if (cpuline[0] == '?')
  788.     {   strcpy(cpustring, "?");
  789.         strcpy(fpustring, "?");
  790.     } else
  791.     {   stringoffset = 0;
  792.         bufferoffset = 8; // to bypass "System: "
  793.         while (cpuline[bufferoffset] != ' ')
  794.         {   cpustring[stringoffset] = cpuline[bufferoffset];
  795.             stringoffset++;
  796.             bufferoffset++;
  797.         }
  798.         cpustring[stringoffset] = 0;
  799.  
  800.         stringoffset = 0;
  801.         bufferoffset++;
  802.         while (cpuline[bufferoffset] != ' ')
  803.         {   fpustring[stringoffset] = cpuline[bufferoffset];
  804.             stringoffset++;
  805.             bufferoffset++;
  806.         }
  807.         fpustring[stringoffset] = 0;
  808.  
  809.         if (fpustring[0] == '(')
  810.         {   strcpy(fpustring, "None");
  811.     }   }
  812.  
  813.     InitHook(&Hook5Struct, Hook5Func, NULL);
  814.  
  815.     /* Create the window object. */
  816.     lockscreen();
  817.  
  818.  /* VERT
  819.      HORIZ
  820.       VERT
  821.        HORIZ
  822.         Label
  823.        HORIZ
  824.         Label
  825.        HORIZ
  826.         Label
  827.        HORIZ
  828.         Label
  829.        HORIZ
  830.         Label
  831.       VERT
  832.        String
  833.        String
  834.        String
  835.        String
  836.        String
  837.       VERT
  838.        Label
  839.        HORIZ
  840.         VERT
  841.          Label
  842.         Integer
  843.        HORIZ
  844.         VERT
  845.          Label
  846.         Integer
  847.        Label
  848.        Label
  849.      HORIZ
  850.       VERT
  851.        HORIZ
  852.         Label
  853.        HORIZ
  854.         Label
  855.        HORIZ
  856.         Label
  857.       VERT
  858.        String
  859.        String
  860.        String
  861.       VERT
  862.        HORIZ
  863.         Label
  864.        HORIZ
  865.         Label
  866.        HORIZ
  867.         Label
  868.       VERT
  869.        String
  870.        String
  871.        String
  872.      HORIZ
  873.       Checkbox
  874.       Checkbox
  875.       Label
  876.       Chooser
  877.      HORIZ
  878.       VERT
  879.        HORIZ
  880.         Label
  881.       VERT
  882.        String
  883.       VERT
  884.        HORIZ
  885.         Label
  886.       VERT
  887.        String
  888.      HORIZ
  889.       Button
  890.       Button */
  891.  
  892.     if (!(WinObject[5] =          NewObject(WINDOW_GetClass(), NULL,
  893.     // window
  894.     WA_PubScreen,                 ScreenPtr,
  895.     WA_ScreenTitle,               "Report+",
  896.     WA_Title,                     "Report+: Manufacturer IDs",
  897.     WA_Activate,                  TRUE,
  898.     WA_DepthGadget,               TRUE,
  899.     WA_DragBar,                   TRUE,
  900.     WA_CloseGadget,               TRUE,
  901.     WA_SizeGadget,                TRUE,
  902.     WA_IDCMP,                     IDCMP_RAWKEY,
  903.     WINDOW_IDCMPHook,             &Hook5Struct,
  904.     WINDOW_IDCMPHookBits,         IDCMP_RAWKEY,
  905.     WINDOW_MenuStrip,             MenuPtr,
  906.     WINDOW_Position,              WPOS_CENTERSCREEN,
  907.     WINDOW_ParentGroup,           manuf_gadgets[GID_5_LY1] =
  908.     NewObject
  909.     (   LAYOUT_GetClass(),        NULL,
  910.         LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  911.         LAYOUT_SpaceOuter,        TRUE,
  912.         LAYOUT_DeferLayout,       TRUE,
  913.         LAYOUT_ShrinkWrap,        TRUE,
  914.         LAYOUT_VertAlignment,     LALIGN_CENTER,
  915.         LAYOUT_HorizAlignment,    LALIGN_CENTER,
  916.         LAYOUT_AddChild,
  917.         NewObject
  918.         (   LAYOUT_GetClass(),    NULL,
  919.             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  920.             LAYOUT_SpaceOuter,    TRUE,
  921.             LAYOUT_VertAlignment, LALIGN_CENTER,
  922.             LAYOUT_HorizAlignment,LALIGN_CENTER,
  923.             LAYOUT_BevelStyle,    BVS_NONE,
  924.             LAYOUT_AddChild,
  925.             NewObject
  926.             (   LAYOUT_GetClass(),            NULL,
  927.                 LAYOUT_Orientation,           LAYOUT_ORIENT_VERT,
  928.                 LAYOUT_VertAlignment,         LALIGN_CENTER,
  929.                 LAYOUT_HorizAlignment,        LALIGN_LEFT,
  930.                 LAYOUT_BevelStyle,            BVS_NONE,
  931.                 LAYOUT_AddChild,
  932.                 NewObject
  933.                 (   LAYOUT_GetClass(),        NULL,
  934.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  935.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  936.                     LAYOUT_BevelStyle,        BVS_NONE,
  937.                     LAYOUT_AddImage,          NewObject
  938.                     (   LABEL_GetClass(),     NULL,
  939.                         LABEL_Text,           "Card:",
  940.                         LABEL_Justification,  LJ_RIGHT,
  941.                         TAG_END
  942.                     ),
  943.                     TAG_END
  944.                 ),
  945.                 LAYOUT_AddChild,
  946.                 NewObject
  947.                 (   LAYOUT_GetClass(),        NULL,
  948.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  949.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  950.                     LAYOUT_BevelStyle,        BVS_NONE,
  951.                     LAYOUT_AddImage,          NewObject
  952.                     (   LABEL_GetClass(),     NULL,
  953.                         LABEL_Text,           "Manufacturer:",
  954.                         LABEL_Justification,  LJ_RIGHT,
  955.                         TAG_END
  956.                     ),
  957.                     TAG_END
  958.                 ),
  959.                 LAYOUT_AddChild,
  960.                 NewObject
  961.                 (   LAYOUT_GetClass(),        NULL,
  962.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  963.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  964.                     LAYOUT_BevelStyle,        BVS_NONE,
  965.                     LAYOUT_AddImage,          NewObject
  966.                     (   LABEL_GetClass(),     NULL,
  967.                         LABEL_Text,           "Product:",
  968.                         LABEL_Justification,  LJ_RIGHT,
  969.                         TAG_END
  970.                     ),
  971.                     TAG_END
  972.                 ),
  973.                 LAYOUT_AddChild,
  974.                 NewObject
  975.                 (   LAYOUT_GetClass(),        NULL,
  976.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  977.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  978.                     LAYOUT_BevelStyle,        BVS_NONE,
  979.                     LAYOUT_AddImage,          NewObject
  980.                     (   LABEL_GetClass(),     NULL,
  981.                         LABEL_Text,           "Description:",
  982.                         LABEL_Justification,  LJ_RIGHT,
  983.                         TAG_END
  984.                     ),
  985.                     TAG_END
  986.                 ),
  987.                 LAYOUT_AddChild,
  988.                 NewObject
  989.                 (   LAYOUT_GetClass(),        NULL,
  990.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  991.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  992.                     LAYOUT_BevelStyle,        BVS_NONE,
  993.                     LAYOUT_AddImage,          NewObject
  994.                     (   LABEL_GetClass(),     NULL,
  995.                         LABEL_Text,           "Serial Number:",
  996.                         LABEL_Justification,  LJ_RIGHT,
  997.                         TAG_END
  998.                     ),
  999.                     TAG_END
  1000.                 ),
  1001.                 TAG_END
  1002.             ),
  1003.             CHILD_WeightedWidth,          0,
  1004.             LAYOUT_AddChild,
  1005.             NewObject
  1006.             (   LAYOUT_GetClass(),        NULL,
  1007.                 // layout
  1008.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1009.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1010.                 LAYOUT_HorizAlignment,    LALIGN_LEFT,
  1011.                 LAYOUT_BevelStyle,        BVS_NONE,
  1012.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST1] =
  1013.                 NewObject
  1014.                 (   STRING_GetClass(),    NULL,
  1015.                     GA_ReadOnly,          TRUE,
  1016.                     GA_ID,                GID_5_ST1,
  1017.                     STRINGA_TextVal,      "-",
  1018.                     STRINGA_MinVisible,   9,
  1019.                     TAG_END
  1020.                 ),
  1021.                 CHILD_MinWidth,           256,
  1022.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST2] =
  1023.                 NewObject
  1024.                 (   STRING_GetClass(),    NULL,
  1025.                     GA_ReadOnly,          TRUE,
  1026.                     GA_ID,                GID_5_ST2,
  1027.                     STRINGA_TextVal,      "-",
  1028.                     TAG_END
  1029.                 ),
  1030.                 CHILD_MinWidth,           256,
  1031.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST3] =
  1032.                 NewObject
  1033.                 (   STRING_GetClass(),    NULL,
  1034.                     GA_ReadOnly,          TRUE,
  1035.                     GA_ID,                GID_5_ST3,
  1036.                     STRINGA_TextVal,      "-",
  1037.                     TAG_END
  1038.                 ),
  1039.                 CHILD_MinWidth,           256,
  1040.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST4] =
  1041.                 NewObject
  1042.                 (   STRING_GetClass(),    NULL,
  1043.                     GA_ReadOnly,          TRUE,
  1044.                     GA_ID,                GID_5_ST4,
  1045.                     STRINGA_TextVal,      "-",
  1046.                     TAG_END
  1047.                 ),
  1048.                 CHILD_MinWidth,           256,
  1049.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST7] =
  1050.                 NewObject
  1051.                 (   STRING_GetClass(),    NULL,
  1052.                     GA_ReadOnly,          TRUE,
  1053.                     GA_ID,                GID_5_ST7,
  1054.                     STRINGA_TextVal,      "-",
  1055.                     STRINGA_MinVisible,   9,
  1056.                     TAG_END
  1057.                 ),
  1058.                 CHILD_MinWidth,           256,
  1059.                 TAG_END
  1060.             ),
  1061.             CHILD_WeightedHeight,         0,
  1062.             LAYOUT_AddChild,
  1063.             NewObject
  1064.             (   LAYOUT_GetClass(),        NULL,
  1065.                 // layout
  1066.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1067.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1068.                 LAYOUT_HorizAlignment,    LALIGN_LEFT,
  1069.                 LAYOUT_BevelStyle,        BVS_NONE,
  1070.                 LAYOUT_AddImage,          NewObject
  1071.                 (   LABEL_GetClass(),     NULL,
  1072.                     LABEL_Text,           "",
  1073.                     TAG_END
  1074.                 ),
  1075.                 LAYOUT_AddChild,
  1076.                 NewObject
  1077.                 (   LAYOUT_GetClass(),        NULL,
  1078.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1079.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1080.                     LAYOUT_VertAlignment,     LALIGN_BOTTOM,
  1081.                     LAYOUT_BevelStyle,        BVS_NONE,
  1082.                     LAYOUT_AddChild,
  1083.                     NewObject
  1084.                     (   LAYOUT_GetClass(),        NULL,
  1085.                         LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1086.                         LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1087.                         LAYOUT_VertAlignment,     LALIGN_CENTER,
  1088.                         LAYOUT_BevelStyle,        BVS_NONE,
  1089.                         LAYOUT_AddImage,          NewObject
  1090.                         (   LABEL_GetClass(),     NULL,
  1091.                             // label
  1092.                             LABEL_Text,           "_ID:",
  1093.                             LABEL_Justification,  LJ_RIGHT,
  1094.                             TAG_END
  1095.                         ),
  1096.                         TAG_END
  1097.                     ),
  1098.                     LAYOUT_AddChild,              manuf_gadgets[GID_5_IN1] =
  1099.                     NewObject
  1100.                     (   INTEGER_GetClass(),       NULL,
  1101.                         GA_ID,                    GID_5_IN1,
  1102.                         GA_RelVerify,             TRUE,
  1103.                         GA_TabCycle,              TRUE,
  1104.                         INTEGER_Number,           querymanuf,
  1105.                         INTEGER_Minimum,          0,
  1106.                         INTEGER_Maximum,          65535,
  1107.                         INTEGER_MinVisible,       5,
  1108.                         TAG_END
  1109.                     ),                                      
  1110.                     TAG_END
  1111.                 ),                                                
  1112.                 CHILD_WeightedHeight,             0,
  1113.                 LAYOUT_AddChild,
  1114.                 NewObject
  1115.                 (   LAYOUT_GetClass(),            NULL,
  1116.                     LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  1117.                     LAYOUT_HorizAlignment,        LALIGN_RIGHT,
  1118.                     LAYOUT_VertAlignment,         LALIGN_BOTTOM,
  1119.                     LAYOUT_BevelStyle,            BVS_NONE,
  1120.                     LAYOUT_AddChild,
  1121.                     NewObject
  1122.                     (   LAYOUT_GetClass(),        NULL,
  1123.                         LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1124.                         LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1125.                         LAYOUT_VertAlignment,     LALIGN_CENTER,
  1126.                         LAYOUT_BevelStyle,        BVS_NONE,
  1127.                         LAYOUT_AddImage,          NewObject
  1128.                         (   LABEL_GetClass(),     NULL,
  1129.                             // label
  1130.                             LABEL_Text,           "I_D:",
  1131.                             LABEL_Justification,  LJ_RIGHT,
  1132.                             TAG_END
  1133.                         ),
  1134.                         TAG_END
  1135.                     ),
  1136.                     LAYOUT_AddChild,          manuf_gadgets[GID_5_IN2] =
  1137.                     NewObject
  1138.                     (   INTEGER_GetClass(),   NULL,
  1139.                         GA_ID,                GID_5_IN2,
  1140.                         GA_RelVerify,         TRUE,
  1141.                         GA_TabCycle,          TRUE,
  1142.                         INTEGER_Number,       queryproduct,
  1143.                         INTEGER_Minimum,      0,
  1144.                         INTEGER_Maximum,      255,
  1145.                         INTEGER_MinVisible,   5,
  1146.                         TAG_END
  1147.                     ),
  1148.                     TAG_END
  1149.                 ),
  1150.                 CHILD_WeightedHeight,         0,
  1151.                 LAYOUT_AddImage,              NewObject
  1152.                 (   LABEL_GetClass(),         NULL,
  1153.                     LABEL_Text,               "",
  1154.                     TAG_END
  1155.                 ),
  1156.                 LAYOUT_AddImage,              NewObject
  1157.                 (   LABEL_GetClass(),         NULL,
  1158.                     LABEL_Text,               "",
  1159.                     TAG_END
  1160.                 ),
  1161.                 TAG_END
  1162.             ),
  1163.             CHILD_WeightedWidth,              0,
  1164.             TAG_END
  1165.         ),
  1166.         CHILD_WeightedHeight,                 0,
  1167.         LAYOUT_AddChild,
  1168.         NewObject
  1169.         (   LAYOUT_GetClass(),                NULL,
  1170.             LAYOUT_Orientation,               LAYOUT_ORIENT_HORIZ,
  1171.             LAYOUT_SpaceOuter,                TRUE,
  1172.             LAYOUT_HorizAlignment,            LALIGN_RIGHT,
  1173.             LAYOUT_VertAlignment,             LALIGN_CENTER,
  1174.             LAYOUT_BevelStyle,                BVS_FIELD,
  1175.             LAYOUT_AddChild,
  1176.             NewObject
  1177.             (   LAYOUT_GetClass(),            NULL,
  1178.                 LAYOUT_Orientation,           LAYOUT_ORIENT_VERT,
  1179.                 LAYOUT_HorizAlignment,        LALIGN_RIGHT,
  1180.                 LAYOUT_VertAlignment,         LALIGN_CENTER,
  1181.                 LAYOUT_BevelStyle,            BVS_NONE,
  1182.                 LAYOUT_AddChild,
  1183.                 NewObject
  1184.                 (   LAYOUT_GetClass(),        NULL,
  1185.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1186.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1187.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1188.                     LAYOUT_BevelStyle,        BVS_NONE,
  1189.                     LAYOUT_AddImage,          NewObject
  1190.                     (   LABEL_GetClass(),     NULL,
  1191.                         LABEL_Text,           "ConfigDev:",
  1192.                         LABEL_Justification,  LJ_RIGHT,
  1193.                     TAG_END),
  1194.                 TAG_END),
  1195.                 LAYOUT_AddChild,
  1196.                 NewObject
  1197.                 (   LAYOUT_GetClass(),        NULL,
  1198.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1199.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1200.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1201.                     LAYOUT_BevelStyle,        BVS_NONE,
  1202.                     LAYOUT_AddImage,          NewObject
  1203.                     (   LABEL_GetClass(),     NULL,
  1204.                         LABEL_Text,           "Board Address:",
  1205.                         LABEL_Justification,  LJ_RIGHT,
  1206.                     TAG_END),
  1207.                 TAG_END),
  1208.                 LAYOUT_AddChild,
  1209.                 NewObject
  1210.                 (   LAYOUT_GetClass(),        NULL,
  1211.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1212.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1213.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1214.                     LAYOUT_BevelStyle,        BVS_NONE,
  1215.                     LAYOUT_AddImage,          NewObject
  1216.                     (   LABEL_GetClass(),     NULL,
  1217.                         LABEL_Text,           "Board Size:",
  1218.                         LABEL_Justification,  LJ_RIGHT,
  1219.                     TAG_END),
  1220.                 TAG_END),
  1221.             TAG_END),
  1222.             LAYOUT_AddChild,
  1223.             NewObject
  1224.             (   LAYOUT_GetClass(),        NULL,
  1225.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1226.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1227.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1228.                 LAYOUT_BevelStyle,        BVS_NONE,
  1229.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST5] =
  1230.                 NewObject
  1231.                 (   STRING_GetClass(),    NULL,
  1232.                     GA_ReadOnly,          TRUE,
  1233.                     GA_ID,                GID_5_ST5,
  1234.                     STRINGA_TextVal,      "-",
  1235.                     STRINGA_MinVisible,   9,
  1236.                 TAG_END),
  1237.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST8] =
  1238.                 NewObject
  1239.                 (   STRING_GetClass(),    NULL,
  1240.                     GA_ReadOnly,          TRUE,
  1241.                     GA_ID,                GID_5_ST8,
  1242.                     STRINGA_TextVal,      "-",
  1243.                     STRINGA_MinVisible,   9,
  1244.                 TAG_END),
  1245.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST9] =
  1246.                 NewObject
  1247.                 (   STRING_GetClass(),    NULL,
  1248.                     GA_ReadOnly,          TRUE,
  1249.                     GA_ID,                GID_5_ST9,
  1250.                     STRINGA_TextVal,      "-",
  1251.                     STRINGA_MinVisible,   9,
  1252.                 TAG_END),
  1253.             TAG_END),
  1254.             LAYOUT_AddChild,
  1255.             NewObject
  1256.             (   LAYOUT_GetClass(),        NULL,
  1257.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1258.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1259.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1260.                 LAYOUT_BevelStyle,        BVS_NONE,
  1261.                 LAYOUT_AddChild,
  1262.                 NewObject
  1263.                 (   LAYOUT_GetClass(),        NULL,
  1264.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1265.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1266.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1267.                     LAYOUT_BevelStyle,        BVS_NONE,
  1268.                     LAYOUT_AddImage,          NewObject
  1269.                     (   LABEL_GetClass(),     NULL,
  1270.                         LABEL_Text,           "Driver:",
  1271.                         LABEL_Justification,  LJ_RIGHT,
  1272.                     TAG_END),
  1273.                 TAG_END),
  1274.                 LAYOUT_AddChild,
  1275.                 NewObject
  1276.                 (   LAYOUT_GetClass(),        NULL,
  1277.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1278.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1279.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1280.                     LAYOUT_BevelStyle,        BVS_NONE,
  1281.                     LAYOUT_AddImage,          NewObject
  1282.                     (   LABEL_GetClass(),     NULL,
  1283.                         LABEL_Text,           "Slot Address:",
  1284.                         LABEL_Justification,  LJ_RIGHT,
  1285.                     TAG_END),
  1286.                 TAG_END),
  1287.                 LAYOUT_AddChild,
  1288.                 NewObject
  1289.                 (   LAYOUT_GetClass(),        NULL,
  1290.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1291.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1292.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1293.                     LAYOUT_BevelStyle,        BVS_NONE,
  1294.                     LAYOUT_AddImage,          NewObject
  1295.                     (   LABEL_GetClass(),     NULL,
  1296.                         LABEL_Text,           "Slot Size:",
  1297.                         LABEL_Justification,  LJ_RIGHT,
  1298.                     TAG_END),
  1299.                 TAG_END),
  1300.             TAG_END),
  1301.             LAYOUT_AddChild,
  1302.             NewObject
  1303.             (   LAYOUT_GetClass(),        NULL,
  1304.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1305.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1306.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1307.                 LAYOUT_BevelStyle,        BVS_NONE,
  1308.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST6] =
  1309.                 NewObject
  1310.                 (   STRING_GetClass(),    NULL,
  1311.                     GA_ReadOnly,          TRUE,
  1312.                     GA_ID,                GID_5_ST6,
  1313.                     STRINGA_TextVal,      "-",
  1314.                     STRINGA_MinVisible,   9,
  1315.                 TAG_END),
  1316.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST10] =
  1317.                 NewObject
  1318.                 (   STRING_GetClass(),    NULL,
  1319.                     GA_ReadOnly,          TRUE,
  1320.                     GA_ID,                GID_5_ST10,
  1321.                     STRINGA_TextVal,      "-",
  1322.                     STRINGA_MinVisible,   9,
  1323.                 TAG_END),
  1324.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST11] =
  1325.                 NewObject
  1326.                 (   STRING_GetClass(),    NULL,
  1327.                     GA_ReadOnly,          TRUE,
  1328.                     GA_ID,                GID_5_ST11,
  1329.                     STRINGA_TextVal,      "-",
  1330.                     STRINGA_MinVisible,   9,
  1331.                 TAG_END),
  1332.             TAG_END),
  1333.         TAG_END),
  1334.         CHILD_WeightedHeight,         0,
  1335.         LAYOUT_AddChild,
  1336.         NewObject
  1337.         (   LAYOUT_GetClass(),        NULL,
  1338.             LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1339.             LAYOUT_SpaceOuter,        TRUE,
  1340.             LAYOUT_HorizAlignment,    LALIGN_CENTER,
  1341.             LAYOUT_VertAlignment,     LALIGN_CENTER,
  1342.             LAYOUT_BevelStyle,        BVS_NONE,
  1343.             LAYOUT_AddChild,          manuf_gadgets[GID_5_CB1] =
  1344.             NewObject
  1345.             (   CHECKBOX_GetClass(),  NULL,
  1346.                 GA_ID,                GID_5_CB1,
  1347.                 GA_RelVerify,         TRUE,
  1348.                 GA_Disabled,          TRUE,
  1349.                 GA_Text,              "Internal?",
  1350.             TAG_END),
  1351.             CHILD_WeightedWidth,      0,
  1352.             LAYOUT_AddChild,          manuf_gadgets[GID_5_CB2] =
  1353.             NewObject
  1354.             (   CHECKBOX_GetClass(),  NULL,
  1355.                 GA_ID,                GID_5_CB2,
  1356.                 GA_RelVerify,         TRUE,
  1357.                 GA_Disabled,          TRUE,
  1358.                 GA_Text,              "Official?",
  1359.             TAG_END),
  1360.             CHILD_WeightedWidth,      0,
  1361.             LAYOUT_AddImage,          NewObject
  1362.             (   LABEL_GetClass(),     NULL,
  1363.                 LABEL_Text,           "",
  1364.                 TAG_END
  1365.             ),
  1366.             CHILD_WeightedWidth,      100,
  1367.             LAYOUT_AddImage,          NewObject
  1368.             (   LABEL_GetClass(),     NULL,
  1369.                 LABEL_Text,           "P_recedence:",
  1370.                 LABEL_Justification,  LJ_RIGHT,
  1371.                 TAG_END
  1372.             ),
  1373.             CHILD_WeightedWidth,      0,
  1374.             LAYOUT_AddChild,          manuf_gadgets[GID_5_CH1] =
  1375.             NewObject
  1376.             (   CHOOSER_GetClass(),   NULL,
  1377.                 GA_ID,                GID_5_CH1,
  1378.                 GA_RelVerify,         TRUE, // otherwise we won't hear the gadget
  1379.                 CHOOSER_PopUp,        TRUE,
  1380.                 CHOOSER_Labels,       &ManufChooserList,
  1381.                 CHOOSER_Selected,     (WORD) precedence,
  1382.                 TAG_END
  1383.             ),
  1384.             CHILD_WeightedWidth,      0,
  1385.         TAG_END),
  1386.         CHILD_WeightedHeight,         0,
  1387.         LAYOUT_AddChild,
  1388.         NewObject
  1389.         (   LAYOUT_GetClass(),        NULL,
  1390.             LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1391.             LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1392.             LAYOUT_VertAlignment,     LALIGN_CENTER,
  1393.             LAYOUT_BevelStyle,        BVS_NONE,
  1394.             LAYOUT_SpaceOuter,        TRUE,
  1395.             LAYOUT_AddChild,
  1396.             NewObject
  1397.             (   LAYOUT_GetClass(),        NULL,
  1398.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1399.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1400.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1401.                 LAYOUT_BevelStyle,        BVS_NONE,
  1402.                 LAYOUT_AddChild,
  1403.                 NewObject
  1404.                 (   LAYOUT_GetClass(),        NULL,
  1405.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1406.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1407.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1408.                     LAYOUT_BevelStyle,        BVS_NONE,
  1409.                     LAYOUT_AddImage,          NewObject
  1410.                     (   LABEL_GetClass(),     NULL,
  1411.                         LABEL_Text,           "CPU:",
  1412.                         LABEL_Justification,  LJ_RIGHT,
  1413.                     TAG_END),
  1414.                 TAG_END),
  1415.             TAG_END),
  1416.             CHILD_WeightedWidth,          0,
  1417.             LAYOUT_AddChild,
  1418.             NewObject
  1419.             (   LAYOUT_GetClass(),        NULL,
  1420.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1421.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1422.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1423.                 LAYOUT_BevelStyle,        BVS_NONE,
  1424.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST12] =
  1425.                 NewObject
  1426.                 (   STRING_GetClass(),    NULL,
  1427.                     GA_ReadOnly,          TRUE,
  1428.                     GA_ID,                GID_5_ST12,
  1429.                     STRINGA_TextVal,      cpustring,
  1430.                     STRINGA_MinVisible,   9,
  1431.                 TAG_END),
  1432.             TAG_END),
  1433.             CHILD_WeightedWidth,          50,
  1434.             LAYOUT_AddChild,
  1435.             NewObject
  1436.             (   LAYOUT_GetClass(),        NULL,
  1437.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1438.                 LAYOUT_SpaceOuter,        TRUE,
  1439.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1440.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1441.                 LAYOUT_BevelStyle,        BVS_NONE,
  1442.                 LAYOUT_AddChild,
  1443.                 NewObject
  1444.                 (   LAYOUT_GetClass(),        NULL,
  1445.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1446.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1447.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1448.                     LAYOUT_BevelStyle,        BVS_NONE,
  1449.                     LAYOUT_AddImage,          NewObject
  1450.                     (   LABEL_GetClass(),     NULL,
  1451.                         LABEL_Text,           "FPU:",
  1452.                         LABEL_Justification,  LJ_RIGHT,
  1453.                     TAG_END),
  1454.                 TAG_END),
  1455.             TAG_END),
  1456.             CHILD_WeightedWidth,          0,
  1457.             LAYOUT_AddChild,
  1458.             NewObject
  1459.             (   LAYOUT_GetClass(),        NULL,
  1460.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1461.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1462.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1463.                 LAYOUT_BevelStyle,        BVS_NONE,
  1464.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST13] =
  1465.                 NewObject
  1466.                 (   STRING_GetClass(),    NULL,
  1467.                     GA_ReadOnly,          TRUE,
  1468.                     GA_ID,                GID_5_ST13,
  1469.                     STRINGA_TextVal,      fpustring,
  1470.                     STRINGA_MinVisible,   9,
  1471.                 TAG_END),
  1472.             TAG_END),
  1473.             CHILD_WeightedWidth,          50,
  1474.         TAG_END),
  1475.         CHILD_WeightedHeight,             0,
  1476.         LAYOUT_AddChild,                  NewObject
  1477.         (   LAYOUT_GetClass(),            NULL,
  1478.             LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  1479.             LAYOUT_VertAlignment,         LALIGN_BOTTOM,
  1480.             LAYOUT_HorizAlignment,        LALIGN_CENTER,
  1481.             LAYOUT_ShrinkWrap,            TRUE,
  1482.             LAYOUT_BevelStyle,            BVS_NONE,
  1483.             LAYOUT_AddChild,              manuf_gadgets[GID_5_BU1] =
  1484.             NewObject
  1485.             (   NULL,                     "button.gadget",
  1486.                 GA_ID,                    GID_5_BU1,
  1487.                 GA_RelVerify,             TRUE,
  1488.                 GA_Text,                  "_Previous Card",
  1489.             TAG_END),
  1490.             CHILD_WeightedWidth,          50,
  1491.             LAYOUT_AddChild,              manuf_gadgets[GID_5_BU2] =
  1492.             NewObject
  1493.             (   NULL,                     "button.gadget",
  1494.                 GA_ID,                    GID_5_BU2,
  1495.                 GA_RelVerify,             TRUE,
  1496.                 GA_Text,                  "_Next Card",
  1497.             TAG_END),
  1498.             CHILD_WeightedWidth,          50,
  1499.         TAG_END),
  1500.         CHILD_WeightedHeight,             100,
  1501.     TAG_END),
  1502.     TAG_END
  1503.     )))
  1504.     {   rq("Can't create ReAction object(s)!");
  1505.     }
  1506.     unlockscreen();
  1507.  
  1508.     /* boards is the actual number of boards found. 0 to (board - 1).
  1509.     We actually use the [board] index as our 'spare' 'queryable' index. */
  1510.  
  1511.     openwindow();
  1512.     ActivateLayoutGadget(manuf_gadgets[GID_5_LY1], MainWindowPtr, NULL, (Object) manuf_gadgets[GID_5_IN1]);
  1513.     updatemanuf();
  1514.     loop();
  1515.     closewindow();
  1516. }
  1517.  
  1518. AGLOBAL void manuf_loop(ULONG gid)
  1519. {   switch(gid)
  1520.     {
  1521.     case GID_5_BU1:
  1522.         whichboard--;
  1523.         updatemanuf();
  1524.     break;
  1525.     case GID_5_BU2:
  1526.         whichboard++;
  1527.         updatemanuf();
  1528.     break;
  1529.     case GID_5_CH1:
  1530.         if (!(GetAttr
  1531.         (   CHOOSER_Selected, manuf_gadgets[GID_5_CH1], (ULONG *) &precedence
  1532.         )))
  1533.         {   rq("Unsupported inquiry!"); // should never happen
  1534.         }
  1535.         autoquery();
  1536.     break;
  1537.     case GID_5_IN1:
  1538.         autoquery();
  1539.     break;
  1540.     case GID_5_IN2:
  1541.         autoquery();
  1542.     break;
  1543.     default:
  1544.     break;
  1545. }   }
  1546.  
  1547. AGLOBAL void manuf_die(void)
  1548. {   IOBuffer[20] = (UBYTE) precedence;
  1549. }
  1550. AGLOBAL void manuf_config(void)
  1551. {   precedence = (ULONG) IOBuffer[20];
  1552. }
  1553.  
  1554. MODULE void checklibrary(ULONG whichmanuf, ULONG whichproduct)
  1555. {   foundmanuf = foundproduct = FALSE;
  1556.  
  1557.     if (BoardsBase)
  1558.     {   if (GetBoardName(manuf_buffer, product_buffer, NULL, whichmanuf, whichproduct))
  1559.         {   SetGadgetAttrs
  1560.             (   manuf_gadgets[GID_5_ST2], MainWindowPtr, NULL,
  1561.                 STRINGA_TextVal, manuf_buffer,
  1562.                 TAG_END
  1563.             );
  1564.             SetGadgetAttrs
  1565.             (   manuf_gadgets[GID_5_ST3], MainWindowPtr, NULL,
  1566.                 STRINGA_TextVal, product_buffer,
  1567.                 TAG_END
  1568.             );
  1569.             SetGadgetAttrs
  1570.             (   manuf_gadgets[GID_5_ST4], MainWindowPtr, NULL,
  1571.                 STRINGA_TextVal, "-",
  1572.                 TAG_END
  1573.             );
  1574.             foundmanuf = foundproduct = TRUE;
  1575.             return; // successful
  1576.     }   }
  1577.     return; // unsuccessful
  1578. }
  1579.  
  1580. MODULE void checkinternal(ULONG whichmanuf, ULONG whichproduct)
  1581. {   SWORD i, /* i must be signed and at least 16 bits wide */
  1582.           j;
  1583.  
  1584.     foundmanuf = foundproduct = FALSE;
  1585.     for (i = 0; i <= MANUFS; i++) // go through each manufacturer
  1586.     {   for (j = 0; j <= 2; j++)  // each manufacturer has up to 3 IDs
  1587.         {   if (whichmanuf == manuf[i].number[j])
  1588.             {   selectedmanuf = i;
  1589.                 foundmanuf = TRUE;
  1590.                 SetGadgetAttrs
  1591.                 (   manuf_gadgets[GID_5_ST2], MainWindowPtr, NULL,
  1592.                     STRINGA_TextVal, manuf[selectedmanuf].name,
  1593.                     TAG_END
  1594.                 );
  1595.                 SetGadgetAttrs
  1596.                 (   manuf_gadgets[GID_5_CB1], MainWindowPtr, NULL,
  1597.                     GA_Selected, TRUE,
  1598.                     TAG_END
  1599.                 );
  1600.                 // official gadget has been already cleared by this point
  1601.                 if (j < manuf[i].howmany)
  1602.                 {   SetGadgetAttrs
  1603.                     (   manuf_gadgets[GID_5_CB2], MainWindowPtr, NULL,
  1604.                         GA_Selected, TRUE,
  1605.                         TAG_END
  1606.                     );
  1607.                 }
  1608.  
  1609.                 selectedproduct = (UWORD) ~0;
  1610.                 for (i = 0; i <= PRODUCTS; i++)
  1611.                 {   if (whichmanuf == product[i].manufid)
  1612.                     {   for (j = 0; j <= 1; j++)
  1613.                         {   if (whichproduct == product[i].number[j])
  1614.                             {   selectedproduct = i;
  1615.                                 // show product details
  1616.                                 SetGadgetAttrs
  1617.                                 (   manuf_gadgets[GID_5_ST3], MainWindowPtr, NULL,
  1618.                                     STRINGA_TextVal, product[selectedproduct].name,
  1619.                                     TAG_END
  1620.                                 );
  1621.                                 SetGadgetAttrs
  1622.                                 (   manuf_gadgets[GID_5_ST4], MainWindowPtr, NULL,
  1623.                                     STRINGA_TextVal, product[selectedproduct].desc,
  1624.                                     TAG_END
  1625.                                 );
  1626.                                 foundproduct = TRUE;
  1627.                                 return; // found both
  1628.                 }   }   }   }
  1629.                 return; // found manuf only
  1630.     }   }   }
  1631.     return; // completely unsuccessful
  1632. }
  1633.  
  1634. MODULE void nomanuf(void)
  1635. {   SetGadgetAttrs
  1636.     (   manuf_gadgets[GID_5_ST2], MainWindowPtr, NULL,
  1637.         STRINGA_TextVal, "-",
  1638.         TAG_END
  1639.     );
  1640. }
  1641.  
  1642. MODULE void noproduct(void)
  1643. {   SetGadgetAttrs
  1644.     (   manuf_gadgets[GID_5_ST3], MainWindowPtr, NULL,
  1645.         STRINGA_TextVal, "-",
  1646.         TAG_END
  1647.     );
  1648.     SetGadgetAttrs
  1649.     (   manuf_gadgets[GID_5_ST4], MainWindowPtr, NULL,
  1650.         STRINGA_TextVal, "-",
  1651.         TAG_END
  1652.     );
  1653. }
  1654.  
  1655. AGLOBAL ULONG Hook5Func(struct Hook *h, VOID *o, VOID *msg)
  1656. {   /* "When the hook is called, the data argument points to the 
  1657.     window object and message argument to the IntuiMessage." */
  1658.  
  1659.     UWORD code, qual;
  1660.  
  1661.     geta4(); // wait till here before doing anything
  1662.  
  1663.     code = ((struct IntuiMessage *) msg)->Code;
  1664.     qual = ((struct IntuiMessage *) msg)->Qualifier;
  1665.  
  1666.     switch(code)
  1667.     {
  1668.     case SCAN_HELP:
  1669.         helpabout();
  1670.     break;
  1671.     case SCAN_ESCAPE:
  1672.         if ((qual & IEQUALIFIER_LSHIFT) || (qual & IEQUALIFIER_RSHIFT))
  1673.         {   cleanexit(EXIT_SUCCESS);
  1674.         } else page = 0;
  1675.     break;
  1676.     case SCAN_R:
  1677.         if (precedence == 0)
  1678.         {   precedence = 1;
  1679.         } else
  1680.         {   // assert(precedence == 1);
  1681.             precedence = 0;
  1682.         }
  1683.         SetGadgetAttrs
  1684.         (   manuf_gadgets[GID_5_CH1], MainWindowPtr, NULL,
  1685.             CHOOSER_Selected, (WORD) precedence,
  1686.             TAG_END
  1687.         );
  1688.         autoquery();
  1689.     break;
  1690.     case SCAN_I:
  1691.         ActivateLayoutGadget(manuf_gadgets[GID_5_LY1], MainWindowPtr, NULL, (Object) manuf_gadgets[GID_5_IN1]);
  1692.     break;
  1693.     case SCAN_D:
  1694.         ActivateLayoutGadget(manuf_gadgets[GID_5_LY1], MainWindowPtr, NULL, (Object) manuf_gadgets[GID_5_IN2]);
  1695.     break;
  1696.     default:
  1697.     break;
  1698.     }
  1699.  
  1700.     return(1);
  1701. }
  1702.  
  1703. MODULE void autoquery(void)
  1704. {   if (!(GetAttr
  1705.     (   INTEGER_Number, manuf_gadgets[GID_5_IN1], (ULONG *) &querymanuf
  1706.     )))
  1707.     {   rq("Unsupported inquiry!"); // should never happen
  1708.     }
  1709.     if (!(GetAttr
  1710.     (   INTEGER_Number, manuf_gadgets[GID_5_IN2], (ULONG *) &queryproduct
  1711.     )))
  1712.     {   rq("Unsupported inquiry!"); // should never happen
  1713.     }
  1714.     runquery(querymanuf, queryproduct);
  1715. }
  1716.